package cn.bdqn.dao.sys;

import cn.bdqn.entity.SwiperImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: ycbdqn
 * @Package: cn.bdqn.dao.sys
 * @Author: huat
 * @Date: 2020/3/10 14:55
 * @Version: 1.0
 */
@Mapper
public interface SysSwiperDao {
    /**
     * 查询轮播图
     * @param page 起始位置
     * @param limit 页面大小
     * @param swiperName    轮播图名称
     * @return
     */
    List<SwiperImage> getAllSwiper(@Param("page") int page, @Param("limit") int limit, @Param("swiperName")  String swiperName);

    /**
     * 查询轮播图总数
     * @param swiperName 轮播图名称
     * @return
     */
    int countSwiper(@Param("swiperName") String swiperName);
    /**
     * 根据id删除轮播图
     * @param swiperId 轮播图id
     * @return
     */
    int deleteSwiper(@Param("swiperId") int swiperId);
    /**
     * 根据id查询轮播图
     * @param swiperId
     * @return
     */
    SwiperImage getSwiperImageById(@Param("swiperId") int swiperId);

    /**
     * 根据id修改轮播图
     * @param swiperImage
     * @return
     */
    int updateSwiperById(SwiperImage swiperImage);
    /**
     * 添加轮播图
     * @param swiperImage
     * @return
     */
    int addSwiper(SwiperImage swiperImage);
}
